const express = require('express')
const bodyParser = require('body-parser')
const db = require('./db')
const router = require('./routes')
const cross = require('./cross')
const port = 5000

db.connect()
const app = express()
app.use(bodyParser.json())
app.use(cross)
app.use(router)

app.listen(port, () => {
  console.log(`Server running on port http://localhost:${port}`)
})